﻿using Entity;
using System.ComponentModel;
using DAO;

namespace BUS
{
    public class TinRaoVatBUS
    {
        public BindingList<TinRaoVat> LoadAll()
        {

            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.LoadAll();
        }
        public BindingList<TinRaoVat> LoadAbuse()
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.LoadAbuse();
        }
        public BindingList<TinRaoVat> LoadAllByNguoiTao(int nguoitao)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.LoadAllByNguoiTao(nguoitao);
        }
        public BindingList<TinRaoVat> LoadAllByNhomTin(int nhomtin)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.LoadAllByNhomTin(nhomtin);
        }
        public TinRaoVat LoadAllById(int id)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.LoadAllById(id);
        }
        public int DeleteByStringId(int id)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.DeleteByStringId(id);
        }
        public int ReportAbuse(int id)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.ReportAbuse(id);
        }
        public TinRaoVat loadTin(int id)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.loadTin(id);
        }
        public int Insert(TinRaoVat kv)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.Insert(kv);
        }
        public int Update(TinRaoVat kv)
        {
            TinRaoVatDAO d = new TinRaoVatDAO();
            return d.Update(kv);
        }
        
    }
}
